Finding Common Ancestors and Disjoint Paths in DAGs
نویسنده
چکیده
We consider the problem of finding pairs of vertex-disjoint paths in a DAG, either connecting two given nodes to a common ancestor, or connecting two given pairs of terminals. It was known how to find a single pair of paths, for either type of input, in polynomial time. We show how to find the k pairs with shortest combined length, in time O(mn + k). We also show how to count all such pairs of paths in O(mn) arithmetic operations. These results can be extended to finding or counting tuples of d disjoint paths, in time O(mnd−1 + k) or O(mnd−1). We give further results on finding the subset of the DAG involved in pairs of disjoint paths, and on finding disjoint paths in linear space. ∗Work supported in part by NSF grant CCR-9258355 and by matching funds from Xerox Corp.
منابع مشابه
Computing Lowest Common Ancestors in Directed Acyclic Graphs
Finding the lowest common ancestor of a given pair of nodes is a fundamental algorithmic problem. In this paper we study the lowest common ancestor(LCA) problem on directed acyclic graphs (DAGs). A lowest common ancestor of two nodes a and b is a node c which is a common ancestor of a and b and no other node is both a common ancestor of a and b and a proper descendant of c. LCA on trees have be...
متن کاملLowest Common Ancestors in Trees and Directed Acyclic Graphs1
We study the problem of finding lowest common ancestors (LCA) in trees and directed acyclic graphs (DAGs). Specifically, we extend the LCA problem to DAGs and study the LCA variants that arise in this general setting. We begin with a clear exposition of Berkman and Vishkin’s simple optimal algorithm for LCA in trees. The ideas presented are not novel theoretical contributions, but they lay the ...
متن کاملEfficient Algorithms for k -Disjoint Paths Problems on DAGs
Given an acyclic directed graph and two distinct nodes s and t, we consider the problem of finding k disjoint paths from s to t satisfying some objective. We consider four objectives, MinMax, Balanced, MinSum-MinMin, and MinSum-MinMax. We use the algorithm by Perl-Shiloach and labelling and scaling techniques to devise an FPTAS for the first three objectives. For the forth one, we propose a gen...
متن کاملEfficient Algorithms for Measuring the Funnel-likeness of DAGs
Funnels are a new natural subclass of DAGs. Intuitively, a DAG is a funnel if every source-sink path can be uniquely identified by one of its arcs. Funnels are an analog to trees for directed graphs that is more restrictive than DAGs but more expressive than in-/out-trees. Computational problems such as finding vertex-disjoint paths or tracking the origin of memes remain NP-hard on DAGs while o...
متن کاملLowest common ancestors in trees and directed acyclic graphs
We study the problem of finding lowest common ancestors (LCA) in trees and directed acyclic graphs (DAGs). Specifically, we extend the LCA problem to DAGs and study the LCA variants that arise in this general setting. We begin with a clear exposition of Berkman and Vishkin’s simple optimal algorithm for LCA in trees. Their ideas lay the foundation for our work on LCA problems in DAGs. We presen...
متن کامل